<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<link rel="stylesheet" type="text/css" href="/incofarming/Views/css/mainpage.css" />
<link href="/incofarming/Views/css/bootstrap.min.css" rel="stylesheet" media="screen">

<style>

.kop-content{
	float: left;
	margin: 0 5px 10px 5px;
}

.kop-item{
	margin-bottom: 10px;
}

.none-product{
	text-align: center;
	background-color: #6495ed;
	padding: 30px 10px 30px 10px;
	border-style: solid;
	border-color: #000;
	font-family: "Courier New", Times, serif;
}
</style>

</head>

<body>
<div id="container">
	<div id="header">
		<div id="logo">
        <img src="img/LOGO.JPG"/>
			        </div>
       	<div>
        	<p align="right">
            	<a href="../../Functions/logout.php">logout</a>
           	</p>
       	</div>
	</div>
    <div class="container-fluid">
      <div class="row-fluid">
        <div class="span3">
          <div class="well sidebar-nav">
            <ul class="nav nav-list">
              <li class="nav-header"></li>
              <li class="active"><a href="#">Dashboard</a></li>
              <li><a href="/incofarming/Functions/koperasi/edit-profil.php">Manajemen Profil</a></li>
              <li><a href="/incofarming/Functions/produk/manajemenproduk.php">Manajemen Produk</a></li>
              
            </ul>
          </div><!--/.well -->
        </div><!--/span-->
        <div class="span9 row-fluid" >
        <div class="hero-unit">
         <h3>Profil Koperasi</h3>
		 
		 <div class='row-fluid'>
			<div class='span4'>
				<img src='<?php if($kop_data['foto'] != 0) echo $kop_data['foto']; else echo '/incofarming/Views/img/default-logo-koperasi.jpg'; ?>' alt='' width='260' height='180' />
			</div>
			<div class='span8'>

				<div class="kop-content">
					<div class="kop-item">Nama Koperasi</div>
					<div class="kop-item">Alamat Koperasi</div>
					<div class="kop-item">Kota</div>
					<div class="kop-item">Provinsi</div>
					<div class="kop-item">No Telp</div>
					<div class="kop-item">No Faximile</div>
					<div class="kop-item">Tanggal Berdiri</div>
					<div class="kop-item">Email</div>
					<div class="kop-item">Informasi</div>
				</div>
				<div class="kop-content right">
					<div class="kop-item"><?php if($kop_data['nama_kop'] == null) echo "<br>"; echo $kop_data['nama_kop']; ?></div>
					<div class="kop-item"><?php if($kop_data['alamat_kop'] == null) echo "<br>"; echo $kop_data['alamat_kop']; ?></div>
					<div class="kop-item"><?php if($kop_data['kota'] == null) echo "<br>"; echo $kop_data['kota']; ?></div>
					<div class="kop-item"><?php if($kop_data['provinsi'] == null) echo "<br>"; echo $kop_data['provinsi']; ?></div>
					<div class="kop-item"><?php if($kop_data['no_telp'] == null) echo "<br>"; echo $kop_data['kode_telp']." - ".$kop_data['no_telp']; ?></div>
					<div class="kop-item"><?php if($kop_data['no_fax'] == null) echo "<br>"; echo $kop_data['kode_telp']." - ".$kop_data['no_fax']; ?></div>
					<div class="kop-item"><?php if($kop_data['tgl_berdiri'] == null) echo "<br>"; echo $kop_data['tgl_berdiri']; ?></div>
					<div class="kop-item"><?php if($kop_data['email'] == null) echo "<br>"; echo $kop_data['email']; ?></div>				
					<div style="position: relative;"><?php if($kop_data['info_kop'] == null) echo "<br>"; echo $kop_data['info_kop']; ?></div>
				</div>
				
			</div>
		</div>
		 
		 <?php for($i=0; $i<count($kop_data); $i++): ?>
			
		 <?php endfor; ?>
        		
        </div>
               <div class="hero-unit">
                <h3>Produk Terakhir</h3>
            	<div class='row-fluid'>
				<ul class='thumbnails'>
				
				<?php if(!isset($prod_arr)): ?>
					<div class="none-product">Koperasi anda tidak memiliki produk</div>
				<?php //var_dump($prod_arr); ?>
				<?php else: ?>
				<?php
					$prod_arr_length = count($prod_arr);
					$min = $prod_arr_length - 3;
					if($min < 0) $min = 0;
					for($i=count($prod_arr)-1; $i>=$min; $i--){
						
						echo "<li class='span4'>";
						foreach($prod_arr as $row){
							if($row['foto'] == null) echo '<img src="/incofarming/Views/img/default-foto-produk.jpg" width="200" height="180">';
							echo "<br>";
							echo "<center>".$row['nama_prod']."</center>";
							
						}
						echo "</li>";
						
					}
				
				?>
					
				<?php endif; ?>
				</ul>
                </div> 
        	</div>
        </div><!--/span-->
      </div><!--/row-->

      <hr>

      <footer>
        <p>&copy; Company 2012</p>
      </footer>

    </div><!--/.fluid-container-->
</div>
<script src="/incofarming/Views/js/jquery-latest.js"></script>
<script src="/incofarming/Views/"></script>
<script src="/incofarming/Views/js/bootstrap-carousel.js"></script>
<script src="/incofarming/Views/js/jquery.js"></script>
<script src="/incofarming/Views/js/bootstrap-dropdown.js"></script>
<script type="text/javascript" src="/incofarming/Views/js/dropdown.js"></script>
</body>
</html>